﻿<phone:PhoneApplicationPage 
    x:Class="OnlineVideos.DownloadPivots"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="728"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False">
    <phone:PhoneApplicationPage.Resources>
        <ItemsPanelTemplate x:Key="ItemsPanelTemplate1">
            <toolkit:WrapPanel/>
        </ItemsPanelTemplate>

    </phone:PhoneApplicationPage.Resources>
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <!--Pivot Control-->
      <phone:Pivot  x:Name="pvtMainDetails" Background="{StaticResource bipivot}">
        <phone:Pivot.Title>
                <StackPanel Orientation="Horizontal" Margin="-25,0,0,0">
                    <Image x:Name="imgTitle" Style="{StaticResource DetailPagePivotTitleImage}" Width="71" Height="71" HorizontalAlignment="Left" MouseEnter="imgTitle_MouseEnter"/>

                    <TextBlock x:Name="tblkVideosTitle" Text="Add Videos"  Style="{StaticResource DetailPagePivotTitle}" TextWrapping="NoWrap"/>
                </StackPanel>
            </phone:Pivot.Title>
        <phone:Pivot.Foreground>
                white
            </phone:Pivot.Foreground>
            <!--Pivot item one-->
        <phone:PivotItem Header="video">
                <Grid>
                    <ListBox x:Name="lbxVideo" ItemsPanel="{StaticResource ItemsPanelTemplate1}" SelectionChanged="lbxVideo_SelectionChanged_1" >
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal" Margin="0,-30,0,0" Height="150" >
                                    <CheckBox x:Name="chkVideo" Height="80" Tag="{Binding Downloaduri}"  Checked="chkVideo_Checked" Unchecked="chkVideo_Unchecked"></CheckBox>
                                    <Image  Height="90"   Margin="0,0,0,0"  Grid.Column="0">
                                        <Image.Source>
                                            <BitmapImage UriSource="{Binding DownLoadVideoImage}" CreateOptions="IgnoreImageCache"></BitmapImage>
                                        </Image.Source>
                                    </Image>
                                    <TextBlock x:Name="txtVideo" Text="{Binding title}" Tag="{Binding YoutubeUrl}" Margin="6,30,0,0" Width="240" Foreground="White" TextWrapping="Wrap"></TextBlock>
                                    <TextBlock  Text="{Binding size}" Margin="0,50,0,0" Width="240" TextWrapping="Wrap" Foreground="White"></TextBlock>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                    <toolkit:PerformanceProgressBar
            VerticalAlignment="Center" Foreground="Red" IsIndeterminate="True"  HorizontalAlignment="Center"
            x:Name="performanceProgressBarVideo"/>
                    <Canvas>
                        <TextBlock Canvas.Top="200" Canvas.Left="3" FontSize="28" Foreground="White" TextWrapping="Wrap" Width="460" x:Name="tblkFavNoMovies" Text="No Videos available" Visibility="Collapsed"/>
                    </Canvas>
                   
                </Grid>
            </phone:PivotItem>
            <!--Pivot item four-->
        <phone:PivotItem Header="links" x:Name="pvtlinks">
                <Grid>
                    <ListBox x:Name="lbxlinks" ItemsPanel="{StaticResource ItemsPanelTemplate1}" SelectionChanged="lbxlinks_SelectionChanged" >
                        <ListBox.ItemTemplate>
                            <DataTemplate>

                                <StackPanel Orientation="Horizontal" Margin="0,-30,0,0" Height="150" >
                                    <TextBlock x:Name="txtlinks" Text="{Binding title}" Foreground="White" Margin="0,50,0,0" Width="240" TextWrapping="Wrap"></TextBlock>
                                </StackPanel>

                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                    <Canvas>
                        <TextBlock Canvas.Top="200" Canvas.Left="3" FontSize="28" Foreground="White" TextWrapping="Wrap" Width="460" x:Name="tblkLinks" Text="No Links available" Visibility="Collapsed"/>
                    </Canvas>
                </Grid>
            </phone:PivotItem>
        </phone:Pivot>
        <toolkit:PerformanceProgressBar
            VerticalAlignment="Center" HorizontalAlignment="Center"
            x:Name="performanceProgressBar"/>
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar  IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="appbariconaddvideos"  IconUri="/Images/appbar.add.png"  Text="add videos" Click="appbariconaddvideos_Click_1"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>